var gameIndex;
$(document).ready(function(){
	createListFromLocalStorage();
	
	$('.watchgame').click(function(){
		
		$('#gameField').show("fast");
		$('#previousgameslist').hide("slow");
		createIds('#table', 'id');
		createIds('#table2', 'enemyid');
		localStorage["gameBeingWatched"] = $(this).attr("id");
		$('#btn1').attr("disabled", 'disabled');
		$('#btn3').removeAttr("disabled"); 
		$('#btn2').removeAttr("disabled");
		gameIndex = localStorage["gameBeingWatched"].replace("game", "");
		
	});	
});